<ot-view>
    <div class="row" ng-show="loadingConfigurations">
        <div class="col-md-12">
            <div class="alert alert-info">
                <span class="ot-loading-indicator"></span>
                Loading the configurations...
            </div>
        </div>
    </div>
    <div class="row" ng-hide="loadingConfigurations">
        <div class="col-md-12">
            <ot-section-title>List of configurations</ot-section-title>
            <div class="row" ng-show="configurations.resources.length > 5">
                <div class="col-md-12">
                    <input id="configuration-filter" ng-model="configurationFilter"
                           class="form-control col-md-2"
                           placeholder="Filter on configurations"
                           />
                </div>
            </div>
            <ot-noentry list="configurations.resources">
                No Jenkins configuration has been created yet.
            </ot-noentry>
            <table class="table table-hover">
                <tr ng-repeat="configuration in configurations.resources | filter:configurationFilter">
                    <td>
                        <code>{{configuration.name}}</code>
                    </td>
                    <td>
                        <span ng-if="configuration.user">
                            {{configuration.user}} @
                        </span>
                        <a href="{{configuration.url}}" target="_blank">{{configuration.url}}</a>
                    </td>
                    <td>
                        <span class="ot-command" ng-click="updateConfiguration(configuration)">
                            <span class="ot-command-update"></span>
                            Update
                        </span>
                        <span class="ot-command" ng-click="deleteConfiguration(configuration)">
                            <span class="ot-command-delete"></span>
                            Delete
                        </span>
                        <span class="ot-command" ng-click="indexation(configuration)">
                            <span class="fa fa-bolt"></span>
                            Indexation
                        </span>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</ot-view>